import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: () => import('../components/Login.vue')
    },
    {
        path: '/mane',
        name: 'mane',
        component: () => import('../views/Mane.vue'),
        redirect: '/maneHome',
        children: [
            {
                path: '/maneHome',
                name: 'home',
                component: () => import('../components/Home.vue')
            },
            {
                path: '/userMane',
                name: 'userMane',
                component: () => import('../components/mane/UserMane.vue')
            },
            {
                path: '/carmaneger',
                name: 'carmaneger',
                component: () => import('../components/car/CarManeger.vue')
            },
            {
                path: '/money',
                name: 'money',
                component: () => import('../components/mane/Money.vue')
            },
            {
                path: '/stallMane',
                name: 'stallMane',
                component: () => import('../components/mane/StallMane.vue')
            },
            {
                path: '/carInMane',
                name: 'carInMane',
                component: () => import('../components/mane/CarInMane.vue')
            },
            {
                path: '/loginInfoMane',
                name: 'loginInfoMane',
                component: () => import('../components/mane/LoginInfoMane.vue')
            }

        ]
    },
    {
        path: '/conmen',
        name: 'conmen',
        component: () => import('../views/Conmen.vue'),
        redirect: '/conmenHome',
        children: [
            {
                path: '/conmenHome',
                name: 'home',
                component: () => import('../components/Home.vue')
            },
            {
                path: '/userInfo',
                name: 'userInfo',
                component: () => import('../components/person/UserInfo.vue')
            },
            {
                path: '/carInfo',
                name: 'carInfo',
                component: () => import('../components/car/CarInfo.vue')
            },
            {
                path: '/cost',
                component: () => import('../components/money/Cost.vue'),
                name: 'cost'
            },
        ]
    }
]

const router = new VueRouter({
    routes
})

export default router
